// Fill out your copyright notice in the Description page of Project Settings.


#include "BaseCharacter.h"
#include "GameFramework\SpringArmComponent.h"
#include "Camera\CameraComponent.h"
#include "GameFramework\CharacterMovementComponent.h"
#include "AbilitySystemComponent.h"
#include "GameTestH\GameTestH.h"
#include "Sound\SoundCue.h"
#include "NiagaraSystem.h"
#include "NiagaraComponent.h"
#include "BasicAttributeSet.h"
#include "PlayerCharacter.h"

// Sets default values
ABaseCharacter::ABaseCharacter()
{
 	// Set this character to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	SpringArmComb = CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArmComponent"));
	SpringArmComb->SetupAttachment(RootComponent);
	SpringArmComb->TargetArmLength = 400;
	SpringArmComb->bUsePawnControlRotation = true;

	CameraComb = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));
	CameraComb->SetupAttachment(SpringArmComb,USpringArmComponent::SocketName);
	CameraComb->bUsePawnControlRotation = false;	

	AbilitySystemComb = CreateDefaultSubobject<UAbilitySystemComponent>(TEXT("AbilitySystemComb"));

	//Niagara
	NiagaraComponent = CreateDefaultSubobject<UNiagaraComponent>(TEXT("NiagaraComponent"));
	NiagaraComponent->SetupAttachment(RootComponent);

	BasicAttributeSet = CreateDefaultSubobject<UBasicAttributeSet>(TEXT("BasicAttributeSet"));
}

//GAS
UAbilitySystemComponent* ABaseCharacter::GetAbilitySystemComponent() const
{
	return AbilitySystemComb;
}

// Called when the game starts or when spawned
void ABaseCharacter::BeginPlay()
{
	Super::BeginPlay();
}

// Called every frame
void ABaseCharacter::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);

}

// Called to bind functionality to input
void ABaseCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
	Super::SetupPlayerInputComponent(PlayerInputComponent);
	
}

